inspector: Fix initial state of dark switch
authorMatthias Clasen <mclasen@redhat.com>
Sun, 14 Sep 2014 12:36:41 +0000 (08:36 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 14 Sep 2014 12:38:28 +0000 (08:38 -0400)
Noticed while debugging a totem problem.

gtk/inspector/visual.c

index a86c9972ee3b1e27d5cf97bffda31d9d1c6cbb11..acd3c8e05fefdca89f56a923dbd739e55f4c9807 100644 (file)
@@ -258,9 +258,9 @@ theme_changed (GtkComboBox        *c,
 static void
 init_dark (GtkInspectorVisual *vis)
 {
-  g_object_bind_property (vis->priv->dark_switch, "active",
-                          gtk_settings_get_default (), "gtk-application-prefer-dark-theme",
-                          G_BINDING_BIDIRECTIONAL);
+  g_object_bind_property (gtk_settings_get_default (), "gtk-application-prefer-dark-theme",
+                          vis->priv->dark_switch, "active",
+                          G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
 
   if (g_getenv ("GTK_THEME") != NULL)
     {